using System;
using System.Collections.Generic;
using System.Linq;
using System.Runtime.InteropServices;
using System.Text;
using System.Threading.Tasks;

namespace GEditor.import
{
    class IGCore
    {
        [DllImport(@"Build\GEngine.dll")]
        public static extern void InitD3D(IntPtr hwnd, double width, double height);

        [DllImport(@"Build\GEngine.dll")]
        public static extern int RenderFrame();

        [DllImport(@"Build\GEngine.dll")]
        public static extern void SaveScene();

        [DllImport(@"Build\GEngine.dll")]
        public static extern int GetSceneObjectNum();

        [DllImport(@"Build\GEngine.dll")]
         public static extern IntPtr GetSceneObjectName(int index);

       

        [DllImport("Build\\GEngine.dll", EntryPoint = "GetSceneObjectTransform")]
        public static extern void GetSceneObjectTransform([MarshalAs(UnmanagedType.LPStr)] string objName, [In, Out] float[] trans);

        [DllImport("Build\\GEngine.dll", EntryPoint = "SetSceneObjectTransform")]
        public static extern void SetSceneObjectTransform([MarshalAs(UnmanagedType.LPStr)] string objName, [In, Out] float[] trans);

        [DllImport("Build\\GEngine.dll", EntryPoint = "GetSceneObjectMeshName")]
        public static extern IntPtr GetSceneObjectMeshName([MarshalAs(UnmanagedType.LPStr)] string objName);
        [DllImport("Build\\GEngine.dll", EntryPoint = "SetSceneObjectMesh")]
        public static extern void SetSceneObjectMesh([MarshalAs(UnmanagedType.LPStr)] string sceneObjectName, [MarshalAs(UnmanagedType.LPStr)] string meshUniqueName);

        [DllImport("Build\\GEngine.dll", EntryPoint = "SelectSceneObject")]
        public static extern void SelectSceneObject([MarshalAs(UnmanagedType.LPStr)] string sceneObjectName);
        
        [DllImport("Build\\GEngine.dll", EntryPoint = "CreateSceneObject")]
        public static extern void CreateSceneObject([MarshalAs(UnmanagedType.LPStr)] string sceneObjectName, [MarshalAs(UnmanagedType.LPStr)] string meshUniqueName);
        
        [DllImport("Build\\GEngine.dll", EntryPoint = "SceneObjectExists")]
        public static extern bool SceneObjectExists([MarshalAs(UnmanagedType.LPStr)] string tryName);

        [DllImport("Build\\GEngine.dll", EntryPoint = "DeleteSceneObject")]
        public static extern bool DeleteSceneObject([MarshalAs(UnmanagedType.LPStr)] string deleteName);

        [DllImport("Build\\GEngine.dll", EntryPoint = "SetProjectName")]
        public static extern void SetProjectName([MarshalAs(UnmanagedType.LPStr)] string projName);

        [DllImport("Build\\GEngine.dll", EntryPoint = "SetExternData")]
        public static extern void SetExternData(uint ini);


    }
}
